#include <stdio.h>

typedef long long int ll;

ll data[21][21][21] = {1};

ll w(ll a, ll b, ll c)
{
    if (a <= 0 || b <= 0 || c <= 0)
        return 1;
    if (a > 20 || b > 20 || c > 20)
        return w(20, 20, 20);
    if (a < b && b < c)
    {
        if (data[a][b][c] != 0)
            return data[a][b][c];
        return data[a][b][c] = w(a, b, c - 1) + w(a, b - 1, c - 1) - w(a, b - 1, c);
    }
    if (data[a][b][c] != 0)
        return data[a][b][c];
    return data[a][b][c] = w(a - 1, b, c) + w(a - 1, b - 1, c) + w(a - 1, b, c - 1) - w(a - 1, b - 1, c - 1);
}

int main()
{
    ll a, b, c;
    scanf("%lld%lld%lld", &a, &b, &c);
    while ((a != -1) || (b != -1) || (c != -1))
    {
        printf("w(%lld, %lld, %lld) = %ld\n", a, b, c, w(a, b, c));
        scanf("%lld%lld%lld", &a, &b, &c);
    }
    return 0;
}
